<?
include("session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../webkit/utils/jquery.js"></script>
<script type="text/javascript" src="../webkit/grid/import.js"></script>
<script type="text/javascript" src="../webkit/dialog/import.js"></script>
<script type="text/javascript" src="../webkit/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="./common.js"></script>
<link type="text/css" rel="stylesheet" href="page.css"/>
</head>
<body>


<table width=100% height=100% cellspacing=0 cellpadding=0>
	<tr bgcolor="#eeeeee">
	<form name=f>
	<td height=30>&nbsp;
	充值时间：<input type="text" id="date_start" name="date_start" onClick="WdatePicker({readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="15"> - <input type="text" id="date_end" name="date_end" onClick="WdatePicker({readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="15">　
	<input type="button" value="查询" onclick="search()">　
	</td>
	</tr>
	<tr>
	<td>
		<table id="flex1" style="display:none"></table>
	</td>
	</form>
	</tr>
</table>


<script type="text/javascript">
	var h = parent.document.body.clientHeight-(115+56);
	if(h < 0) h = 'auto'
	$("#flex1").flexigrid({
		url: 'money_query.php?action=list',
		dataType: 'json',
		colModel : [
			{display: 'ID', name : 'a', width : 30, sortable : false, align: 'center'},
			{display: '用户账号', name : 'user_name', width : 100, sortable : false, align: 'center'},
			{display: '用户名称', name : 'true_name', width : 150, sortable : false, align: 'center'},
			{display: '充值单价(元)', name : 'charge_price', width : 120, sortable : true, align: 'center'},
			{display: '充值条数', name : 'charge_count', width : 120, sortable : false, align: 'center'},
			{display: '充值金额(元)', name : 'charge_money', width : 120, sortable : true, align: 'center'},
			{display: '充值时间', name : 'charge_time', width : 150, sortable : true, align: 'center'},
			/*{display: '操作用户', name : 'op_user', width : 100, sortable : true, align: 'center'},*/
			{display: '充值备注', name : 'charge_desc', width : 300, sortable : true, align: 'center'}
			],
		async : true,
		usepager: true,
		title: '充值记录',
		useRp: true,
		rp: 15,
		showTableToggleBtn: false,
		width: 'auto',
		height: h,
		resizable : false,
		singleSelect : true,
		onSuccess : function() {show_sum_total("4,5,")}	
	});

   

	function search() { 
		var url = "money_query.php?action=list";
        if($("#date_start").val()!="" && $("#date_end").val()!="") {
            url += "&date_range="+ $("#date_start").val() +"_"+ $("#date_end").val();
        } 
		$('#flex1').flexOptions({'url': url}).flexReload(); 
	}


</script>
</body>
</html>
